package org.com.ashen.web.constant;

/**
 * Created by yizhenn on 16-12-4.
 */
public  class CommonUtils {
    public static final String CONTENT_TYPE="application/json;charset=utf-8";
    public static final String CONTENT_TYPE_FILE="multipart/form-data;charset=utf-8";
    
//    public static final String FILE_PATH="/Users/longsheng/Desktop/Tomcat7/tempdata.txt";
    public static final String FILE_PATH="C:/tempdata.txt";
    public static final String PAYSFILE_PATH="C:/ashenpays.txt";
    public static final String WEBFILE_PATH="C:/ashenweb.txt";
    public static final String SUCCESS="SUCCESS";
    public static final String FAIL="FAIL";
    public static final String ALIPAY="ALIPAY";
    public static final String WEIXINPAY="WEIXINPAY";
    
    public static String add(int a, int c) {
    	String b = c+"";
		for (int i = 0; i < a; i++) {
			b = "0"+b;
		}
		return b;
	}
   
    public static byte[] byteMergerAll(byte[]... values) {
        int length_byte = 0;
            for (int i = 0; i < values.length; i++) {
                length_byte += values[i].length;
            }
            byte[] all_byte = new byte[length_byte];
            int countLength = 0;
            for (int i = 0; i < values.length; i++) {
                byte[] b = values[i];
                System.arraycopy(b, 0, all_byte, countLength, b.length);
                countLength += b.length;
            }
            return all_byte;
    }
}
